<?php
// +----------------------------------------------------------------------
// | Author: 黄柯柯 < keke.huang@ostengar.com>
// +----------------------------------------------------------------------
namespace app\user\model;

use think\Model;

class UserFollowModel extends Model
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    /**
     * 关联 user表 关注
     * @return \think\model\relation\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo('UserModel', 'user_id')->setEagerlyType(1);
    }
    /**
     * 关联 user表 粉丝
     * @return \think\model\relation\BelongsTo
     */
    public function followUser()
    {
        return $this->belongsTo('UserModel', 'user_id')->setEagerlyType(1);
    }

}
